/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-image: url('../picture/F2.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #333;
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 背景渐变遮罩 - 增强视觉层次感 */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 40, 80, 0.7) 100%);
  z-index: -1;
}

/* 背景光效 - 增强科技感 */
body::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(25, 118, 210, 0.2) 0%, rgba(25, 118, 210, 0) 70%);
  border-radius: 50%;
  z-index: -1;
  animation: pulseLight 8s ease-in-out infinite alternate;
}

@keyframes pulseLight {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }

  100% {
    transform: scale(1.2);
    opacity: 0.5;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(15px);
  animation: fadeIn 0.8s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

h1 {
  text-align: center;
  margin-bottom: 2.5rem;
  color: #1976d2;
  font-size: 2.4rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 10%;
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, rgba(25, 118, 210, 0) 0%, rgba(25, 118, 210, 0.8) 50%, rgba(25, 118, 210, 0) 100%);
}

.main-content {
  display: flex;
  gap: 1.8rem;
  align-items: stretch;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  background: rgba(255, 255, 255, 0.92);
  min-height: 500px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(25, 118, 210, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.main-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, #1976d2 0%, #0d47a1 100%);
}

.main-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, #1976d2, #2196f3);
}

.input-section {
  background-color: #f8fafc;
  border: 2px solid #e3e8ee;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 2rem 0;
}

/* 原有的左右分栏输入样式已被四行两列布局替代 */

.output-section {
  width: 100%;
  border-radius: 12px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(25, 118, 210, 0.1);
  transition: all 0.3s ease;
}

.result-section {
  margin-top: 0;
}

.form-group {
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #555;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus {
  border-color: #1976d2;
  outline: none;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.score-analysis {
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.score-level {
  font-weight: bold;
}

.score-suggestion {
  color: #666;
  font-size: 0.9rem;
}

.btn-bottom-center {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

.predict-btn {
  width: 240px;
  max-width: 90vw;
  margin: 0 auto;
  padding: 1rem;
  background: linear-gradient(45deg, #1976d2, #2196f3);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
  position: relative;
  overflow: hidden;
}

.predict-btn:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.5s;
}

.predict-btn:hover {
  background: linear-gradient(45deg, #1565c0, #1976d2);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
  transform: translateY(-2px);
}

.predict-btn:hover:before {
  left: 100%;
}

.predict-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(25, 118, 210, 0.3);
}

.prediction-result,
.recommendation {
  margin-bottom: 2rem;
  margin-top: 0;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-left: 5px solid #1976d2;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.prediction-result::before,
.recommendation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, #1976d2 0%, #0d47a1 100%);
}

.prediction-result:hover,
.recommendation:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

h3 {
  color: #1976d2;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  font-weight: 600;
  position: relative;
  display: inline-block;
  border-bottom: 3px solid #1976d2;
  padding-bottom: 0.5rem;
}

h3::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: #ff9800;
}

.score-box {
  text-align: center;
  margin: 1rem 0;
}

.score-box .score {
  font-size: 2.5rem;
  font-weight: bold;
  color: #1976d2;
}

.prediction-level,
.prediction-probability {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.probability-highlight {
  color: #1976d2;
  font-weight: bold;
  font-size: 1.15rem;
}

.main-recommendation {
  font-size: 1.1rem;
  font-weight: 500;
  color: #2196f3;
  margin-bottom: 1rem;
}

.suggestion-list {
  list-style: none;
}

.suggestion-list li {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #f1f8ff;
  border-radius: 4px;
}

/* #prediction-details span,
#prediction-details div,
#prediction-details p {
  display: block;
  background: none;

  border-radius: 0;

  padding: 0;

  margin: 0;
  font-size: 1.08rem;
  border: none;

} */

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
  }

  .container {
    margin: 1rem;
    padding: 1rem;
  }
}

/* 保存和更改按钮样式 */
button[id^="save"],
button[id^="change"] {
  padding: 0.6rem 1.2rem;
  margin-top: 0.8rem;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.1s;
  font-weight: 500;
}

button[id^="save"] {
  background: linear-gradient(45deg, #1976d2, #2196f3);
  color: white;
  box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
  position: relative;
  overflow: hidden;
}

button[id^="save"]:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.5s;
}

button[id^="save"]:hover {
  background: linear-gradient(45deg, #1565c0, #1976d2);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
  transform: translateY(-2px);
}

button[id^="save"]:hover:before {
  left: 100%;
}

button[id^="save"]:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(25, 118, 210, 0.3);
}

button[id^="change"] {
  background-color: #ff9800;
  color: white;
}

button[id^="change"]:hover {
  background-color: #f57c00;
}

button[id^="change"]:active {
  transform: translateY(1px);
}

/* 用户信息显示区域样式 */
.user-info-section {
  background-color: #f8fafc;
  border: 2px solid #e3e8ee;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.user-info-section>div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

/* 三框并排的输入网格 */
.input-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

/* 底部按钮一行三列布局 */
.bottom-buttons-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-top: 1px solid rgba(25, 118, 210, 0.2);
}

.bottom-buttons-container a {
  padding: 0.8rem 1.5rem;
  background: linear-gradient(45deg, #1976d2, #2196f3);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  display: inline-block;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(25, 118, 210, 0.2);
  position: relative;
  overflow: hidden;
  border: none;
}

.bottom-buttons-container a:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.5s;
}

.bottom-buttons-container a:hover {
  background: linear-gradient(45deg, #1565c0, #1976d2);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(25, 118, 210, 0.3);
}

.bottom-buttons-container a:hover:before {
  left: 100%;
}

.bottom-buttons-container a:active {
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(25, 118, 210, 0.2);
}

.user-info-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.user-info-item input {
  flex: 1;
  padding: 0.6rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  margin-right: 0.8rem;
}

.user-info-item input:focus {
  border-color: #1976d2;
  outline: none;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.user-info-item span {
  font-weight: 500;
  color: #333;
  margin-right: 0.8rem;
}

/* 保持响应式 */
@media (max-width: 900px) {
  .main-content {
    flex-direction: column;
  }

  .output-section {
    width: 100%;
    margin-left: 0;
    margin-top: 2rem;
  }

  .user-info-item {
    flex-direction: column;
    align-items: stretch;
  }

  .user-info-item input {
    margin-right: 0;
    margin-bottom: 0.8rem;
  }
}